import  time

from selenium import webdriver
from selenium.webdriver.common.by import By


driver = webdriver.Chrome(executable_path='Chromedriver.exe')
# 2.输入访问地址（URL）
driver.get("http://121.43.169.97:8848/pageA.html")
#3页面操作
#通过name属性定位页面元素
#定位元素并输入内容
#id选择器
driver.find_element(By.CSS_SELECTOR,"#userA").send_keys("admin")
#属性选择器
driver.find_element(By.CSS_SELECTOR,"[name='passwordA']").send_keys("123456")
#类选择器
driver.find_element(By.CSS_SELECTOR,".telA").send_keys("18776895770")
#多个class值，通过点号连接
driver.find_element(By.CSS_SELECTOR,".emailA.dzyxA").send_keys("2431521637@qq.com")
#标签选择器
driver.find_element(By.CSS_SELECTOR,"button").click()





# # 3.页面信息操作
# #暂停3秒
# time.sleep(3)
# # 4.关闭/退出浏览器
# #关闭驱动
# driver.quit()